#pragma once
#include <vector>
#include <list>

using namespace std;

class CInsertSort
{
	
public:
	CInsertSort(void);
	~CInsertSort(void);

public:
	void pushDataToPool(const int i);
	void eraseDataInPool(const int i);
	void clearDataPool();

	void DoSort();
	int GetList(list<int>& out_list);

private:
	void _DoSort();
	void _InsertToRightPos_List(const int i);

	void debugPrint();

	struct node_me
	{
		node_me * m_pnext;
		int m_ivalue;

		node_me() : m_pnext(NULL)
		{
			m_ivalue = -1;
		}
	};

private:
	vector<int> m_viPool;
	node_me * m_pmylist;
};

